﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

using XianShang.Data;
using XianShang.Common;
using XianShang.Entity;
using XianShang.Data.DataProvider;

namespace XianShang.Data.DataProvider
{
    public class Help
    {
        /// <summary>
        /// 增加一條使用说明信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int AddHelpInfo(HelpInfo Hinfo)
        {
            return DatabaseProvider.GetInstance().AddHelpInfo(Hinfo);
        }
        /// <summary>
        /// 增加一條使用说明信息
        /// </summary>
        /// <param name="user"></param>
        /// <returns></returns>
        public static int AddHtmlHelpInfo(HelpInfo Hinfo)
        {
            return DatabaseProvider.GetInstance().AddHtmlHelpInfo(Hinfo);
        }

        /// <summary>
        /// 獲取信息顯示使用说明列表
        /// </summary>
        /// <returns></returns>
        public static DataSet GetHelpInfo()
        {
            return DatabaseProvider.GetInstance().GetHelpInfo();
        }


        /// <summary>
        ///  獲取一條要修改的使用说明信息顯示
        /// </summary>
        /// <returns></returns>
        public static HelpInfo GetHelpId(string HId)
        {
            return DatabaseProvider.GetInstance().GetHelpId(HId);
        }

        /// <summary>
        /// 更新一條要修改的使用说明信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpHelpByHtmlInfo(HelpInfo hInfo)
        {
            return DatabaseProvider.GetInstance().UpHelpByHtmlInfo(hInfo);
        }

        /// <summary>
        /// 更新一條要修改的使用说明信息
        /// </summary>
        /// <param name="FileName"></param>
        /// <returns></returns>
        public static int UpHelpInfo(string Title, string Content, string Id)
        {
            return DatabaseProvider.GetInstance().UpHelpInfo(Title, Content, Id);
        }

        /// <summary>
        /// 根據使用说明ID刪除使用说明信息
        /// </summary>
        /// <returns></returns>
        public static int DelHelpInfo(string Id)
        {
            return DatabaseProvider.GetInstance().DelHelpInfo(Id);  
        }
    }
}
